package com.sy.mapper;

import com.github.pagehelper.Page;
import com.sy.dto.HomeworkCheckTab;
import com.sy.dto.SubmitStudentMsg;
import com.sy.entity.Score;
import com.sy.vo.ScoreVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ScoreMapper {
    /**
     *根据学生id和作业id查找分数表
     */
    Score getScoreByStudentIAndHomeworkId(@Param("msg")SubmitStudentMsg submitStudentMsg);
    /**
     * 插入分数表中的studentId和homeworkId
     */
    boolean addScoreByHasSubmit(@Param("msg")SubmitStudentMsg submitStudentMsg);
    /**
     * 获得分数表中的已提交学生的数据
     */
    List<HomeworkCheckTab> getScoreBySubmitStudentsId(@Param("vo") List<SubmitStudentMsg> hasSubmitStudentsMsg);
    /**
     * 更新分数表根据分数表id
     */
    boolean updateScoreById(@Param("id")Integer scoreId, @Param("vo")ScoreVo scoreVo,@Param("name")String teacherName);

    boolean delScoreByStudentId(Integer studentId);
}
